#ifndef __COEFFCREATOR__
#define __COEFFCREATOR__


namespace CoeffCreator
{
	enum Type
	{
		kBand10,
		kBand40,
		kBand160,
		kBand640,
		kShelf2k5,
		kA2k5,
		kA5k,
		kA10k,
		kA20k,
		kA40k,
	 
		kNumTypes
	};

	enum SampleRates
	{
		k44100,
		k48000,
		k88200,
		k96000,
		k176400,
		k192000,
	 
		kNumSamplerates
	};
	 
	inline void setCoeffs(Type type, SampleRates sr, double* b, double* a)
	{
		switch (sr)
		{
		case k44100:
			switch (type)
			{
			case kBand10:
				b[0]=0.00687960864176262; b[1]=-2.6786482747454e-005; b[2]=-0.00685282215901528;
				a[0]=1; a[1]=-1.99725162775152; a[2]=0.997253513839842;
				break;
			case kBand40:
				b[0]=0.027734373141687; b[1]=-0.00043197866607203; b[2]=-0.0273023944756151;
				a[0]=1; a[1]=-1.98896222677188; a[2]=0.988992646474317;
				break;
			case kBand160:
				b[0]=0.112038261600862; b[1]=-0.00682628986731748; b[2]=-0.105211971733544;
				a[0]=1; a[1]=-1.95606842395769; a[2]=0.956549951070252;
				break;
			case kBand640:
				b[0]=0.46215913087529; b[1]=-0.100724966059873; b[2]=-0.361434164815417;
				a[0]=1; a[1]=-1.82798233640788; a[2]=0.835279234299374;
				break;
			case kShelf2k5:
				b[0]=7.22624337378255; b[1]=-7.22841124679468; b[2]=0.00216787301213476;
				a[0]=1; a[1]=-0.839710985475125; a[2]=0;
				break;
			case kA2k5:
				b[0]=8.7136995897128; b[1]=-8.7197991794256; b[2]=0.00609958971279896;
				a[0]=1; a[1]=-0.75318325668643; a[2]=0;
				break;
			case kA5k:
				b[0]=7.65520008023267; b[1]=-7.67740016046535; b[2]=0.0222000802326748;
				a[0]=1; a[1]=-0.567285018152776; a[2]=0;
				break;
			case kA10k:
				b[0]=6.05465587044534; b[1]=-6.12731174089069; b[2]=0.0726558704453441;
				a[0]=1; a[1]=-0.321812291820596; a[2]=0;
				break;
			case kA20k:
				b[0]=3.91047559838359; b[1]=-4.04695119676718; b[2]=0.136475598383587;
				a[0]=1; a[1]=-0.0896078418030509; a[2]=0;
				break;
			case kA40k:
				b[0]=2.07898706896552; b[1]=-2.22867413793103; b[2]=0.149687068965517;
				a[0]=1; a[1]=-0.00577869972806295; a[2]=0;
				break;
			default:
				jassertfalse;
				break;
			}
			break;
		case k48000:
			switch (type)
			{
			case kBand10:
				b[0]=0.00632034478713139; b[1]=-2.26130616749476e-005; b[2]=-0.00629773172545611;
				a[0]=1; a[1]=-1.99747479246959; a[2]=0.997476384697481;
				break;
			case kBand40:
				b[0]=0.025476157962407; b[1]=-0.000364803962707549; b[2]=-0.0251113539996993;
				a[0]=1; a[1]=-1.98985680876498; a[2]=0.989882497606123;
				break;
			case kBand160:
				b[0]=0.102858434245967; b[1]=-0.00577404214223232; b[2]=-0.0970843921037347;
				a[0]=1; a[1]=-1.95960424741847; a[2]=0.960011433245174;
				break;
			case kBand640:
				b[0]=0.42362385664754; b[1]=-0.0859982330049096; b[2]=-0.33762562364263;
				a[0]=1; a[1]=-1.84154533049417; a[2]=0.847748701860461;
				break;
			case kShelf2k5:
				b[0]=7.27513453384051; b[1]=-7.27658956074728; b[2]=0.0014550269067681;
				a[0]=1; a[1]=-0.851714980142772; a[2]=0;
				break;
			case kA2k5:
				b[0]=8.80918551130678; b[1]=-8.81447102261357; b[2]=0.00528551130678407;
				a[0]=1; a[1]=-0.770730381231748; a[2]=0;
				break;
			case kA5k:
				b[0]=7.81375300721732; b[1]=-7.83250601443464; b[2]=0.0187530072173216;
				a[0]=1; a[1]=-0.594025320553635; a[2]=0;
				break;
			case kA10k:
				b[0]=6.26260080645161; b[1]=-6.31270161290322; b[2]=0.0501008064516129;
				a[0]=1; a[1]=-0.352866081458849; a[2]=0;
				break;
			case kA20k:
				b[0]=4.1485914766278; b[1]=-4.2767829532556; b[2]=0.128191476627799;
				a[0]=1; a[1]=-0.109010392557085; a[2]=0;
				break;
			case kA40k:
				b[0]=2.26547619047619; b[1]=-2.43765238095238; b[2]=0.17217619047619;
				a[0]=1; a[1]=-0.00878377960664006; a[2]=0;
				break;
			default:
				jassertfalse;
				break;
			}
			break;
		case k88200:
			switch (type)
			{
			case kBand10:
				b[0]=0.00343881436415949; b[1]=-6.70125989810089e-006; b[2]=-0.00343211310426172;
				a[0]=1; a[1]=-1.99862534266006; a[2]=0.998625814506316;
				break;
			case kBand40:
				b[0]=0.0138511269787662; b[1]=-0.000108302619675094; b[2]=-0.0137428243590912;
				a[0]=1; a[1]=-1.99447358377112; a[2]=0.994481209732359;
				break;
			case kBand160:
				b[0]=0.0557612521988229; b[1]=-0.00172786240128997; b[2]=-0.0540333897975331;
				a[0]=1; a[1]=-1.97791935459353; a[2]=0.978041071529015;
				break;
			case kBand640:
				b[0]=0.227449290098967; b[1]=-0.026873398640382; b[2]=-0.200575891458585;
				a[0]=1; a[1]=-1.91248877535835; a[2]=0.914394891626221;
				break;
			case kShelf2k5:
				b[0]=7.54018594612319; b[1]=-7.5405629554205; b[2]=0.00037700929730616;
				a[0]=1; a[1]=-0.916357455076961; a[2]=0;
				break;
			case kA2k5:
				b[0]=9.32493249324932; b[1]=-9.32586498649865; b[2]=0.000932493249324933;
				a[0]=1; a[1]=-0.867861311896336; a[2]=0;
				break;
			case kA5k:
				b[0]=8.71148459383753; b[1]=-8.71496918767507; b[2]=0.00348459383753501;
				a[0]=1; a[1]=-0.75318325668643; a[2]=0;
				break;
			case kA10k:
				b[0]=7.64523237179487; b[1]=-7.65746474358974; b[2]=0.0122323717948718;
				a[0]=1; a[1]=-0.567285018152776; a[2]=0;
				break;
			case kA20k:
				b[0]=5.8493605880576; b[1]=-5.88972117611519; b[2]=0.0403605880575974;
				a[0]=1; a[1]=-0.299345689467964; a[2]=0;
				break;
			case kA40k:
				b[0]=3.67794871794872; b[1]=-3.76989743589744; b[2]=0.091948717948718;
				a[0]=1; a[1]=-0.0760177592938844; a[2]=0;
				break;
			default:
				jassertfalse;
				break;
			}
			break;
		case k96000:
			switch (type)
			{
			case kBand10:
				b[0]=0.00315933681746894; b[1]=-5.65686141906774e-006; b[2]=-0.00315367995604976;
				a[0]=1; a[1]=-1.99873699833689; a[2]=0.998737396645296;
				break;
			case kBand40:
				b[0]=0.0127245248924197; b[1]=-9.14393477491338e-005; b[2]=-0.0126330855446709;
				a[0]=1; a[1]=-1.99492203938101; a[2]=0.994928477912536;
				break;
			case kBand160:
				b[0]=0.0512113420894151; b[1]=-0.00145990579024957; b[2]=-0.0497514362991657;
				a[0]=1; a[1]=-1.97970461050796; a[2]=0.97980744427529;
				break;
			case kBand640:
				b[0]=0.208671241939082; b[1]=-0.022791030981683; b[2]=-0.185880210957399;
				a[0]=1; a[1]=-1.91947493614855; a[2]=0.921089661960586;
				break;
			case kShelf2k5:
				b[0]=7.56617029618815; b[1]=-7.56654860470296; b[2]=0.000378308514809408;
				a[0]=1; a[1]=-0.922884055633627; a[2]=0;
				break;
			case kA2k5:
				b[0]=9.37693769376938; b[1]=-9.37787538753875; b[2]=0.000937693769376938;
				a[0]=1; a[1]=-0.87791251342702; a[2]=0;
				break;
			case kA5k:
				b[0]=8.80752300920368; b[1]=-8.81104601840736; b[2]=0.00352300920368147;
				a[0]=1; a[1]=-0.770730381231748; a[2]=0;
				break;
			case kA10k:
				b[0]=7.80514669069791; b[1]=-7.81529338139582; b[2]=0.0101466906979073;
				a[0]=1; a[1]=-0.594025320553635; a[2]=0;
				break;
			case kA20k:
				b[0]=6.07843137254902; b[1]=-6.11186274509804; b[2]=0.0334313725490196;
				a[0]=1; a[1]=-0.330167219083125; a[2]=0;
				break;
			case kA40k:
				b[0]=3.91611253196931; b[1]=-4.00422506393862; b[2]=0.0881125319693094;
				a[0]=1; a[1]=-0.0937218203335811; a[2]=0;
				break;
			default:
				jassertfalse;
				break;
			}
			break;
		case k176400:
			switch (type)
			{
			case kBand10:
				b[0]=0.00171915978285275; b[1]=-1.67589309696403e-006; b[2]=-0.0017174838897559;
				a[0]=1; a[1]=-1.99931255326336; a[2]=0.999312671265478;
				break;
			case kBand40:
				b[0]=0.006921552618389; b[1]=-2.71136854301801e-005; b[2]=-0.00689443893295871;
				a[0]=1; a[1]=-1.99723489256226; a[2]=0.997236801689728;
				break;
			case kBand160:
				b[0]=0.027815957908494; b[1]=-0.00043451062088784; b[2]=-0.0273814472876059;
				a[0]=1; a[1]=-1.98892992093676; a[2]=0.988960518958525;
				break;
			case kBand640:
				b[0]=0.112706015222845; b[1]=-0.00690610777545975; b[2]=-0.105799907447385;
				a[0]=1; a[1]=-1.95581164515436; a[2]=0.956298813135888;
				break;
			case kShelf2k5:
				b[0]=7.70436825885978; b[1]=-7.70436825885978; b[2]=0;
				a[0]=1; a[1]=-0.957265613650131; a[2]=0;
				break;
			case kA2k5:
				b[0]=9.654; b[1]=-9.654; b[2]=0;
				a[0]=1; a[1]=-0.93159074270644; a[2]=0;
				break;
			case kA5k:
				b[0]=9.32493249324932; b[1]=-9.32586498649865; b[2]=0.000932493249324933;
				a[0]=1; a[1]=-0.867861311896336; a[2]=0;
				break;
			case kA10k:
				b[0]=8.71148459383753; b[1]=-8.71496918767507; b[2]=0.00348459383753501;
				a[0]=1; a[1]=-0.75318325668643; a[2]=0;
				break;
			case kA20k:
				b[0]=7.52103365384615; b[1]=-7.53306730769231; b[2]=0.0120336538461538;
				a[0]=1; a[1]=-0.547124930402522; a[2]=0;
				break;
			case kA40k:
				b[0]=5.65878208354303; b[1]=-5.69556416708606; b[2]=0.0367820835430297;
				a[0]=1; a[1]=-0.275713183025195; a[2]=0;
				break;
			default:
				jassertfalse;
				break;
			}
			break;
		case k192000:
			switch (type)
			{
			case kBand10:
				b[0]=0.00157945958506178; b[1]=-1.41466358760667e-006; b[2]=-0.00157804492147429;
				a[0]=1; a[1]=-1.99936839949014; a[2]=0.999368499098693;
				break;
			case kBand40:
				b[0]=0.0063588772000851; b[1]=-2.28893009879272e-005; b[2]=-0.00633598789909717;
				a[0]=1; a[1]=-1.99745941530163; a[2]=0.997461026980162;
				break;
			case kBand160:
				b[0]=0.0255510857445522; b[1]=-0.000366942707050733; b[2]=-0.0251841430375016;
				a[0]=1; a[1]=-1.98982711477985; a[2]=0.989852954242112;
				break;
			case kBand640:
				b[0]=0.103471034606003; b[1]=-0.00584163728164944; b[2]=-0.0976293973243535;
				a[0]=1; a[1]=-1.95936795193912; a[2]=0.95977991208492;
				break;
			case kShelf2k5:
				b[0]=7.71775346687211; b[1]=-7.71775346687211; b[2]=0;
				a[0]=1; a[1]=-0.960668546187303; a[2]=0;
				break;
			case kA2k5:
				b[0]=9.682; b[1]=-9.682; b[2]=0;
				a[0]=1; a[1]=-0.936969857267042; a[2]=0;
				break;
			case kA5k:
				b[0]=9.37693769376938; b[1]=-9.37787538753875; b[2]=0.000937693769376938;
				a[0]=1; a[1]=-0.87791251342702; a[2]=0;
				break;
			case kA10k:
				b[0]=8.80752300920368; b[1]=-8.81104601840736; b[2]=0.00352300920368147;
				a[0]=1; a[1]=-0.770730381231748; a[2]=0;
				break;
			case kA20k:
				b[0]=7.69030448717949; b[1]=-7.70260897435898; b[2]=0.0123044871794872;
				a[0]=1; a[1]=-0.574601791750709; a[2]=0;
				break;
			case kA40k:
				b[0]=5.90050327126321; b[1]=-5.93885654252642; b[2]=0.0383532712632109;
				a[0]=1; a[1]=-0.306140197186814; a[2]=0;
				break;
			default:
				jassertfalse;
				break;
			}
			break;
		default:
			jassertfalse;
			break;
		}
	}

}
#endif //__COEFFCREATOR__